package FiveChessGame;

//download by http://www.codefans.net
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

/**
 * 
 ***************************************************** 
 * <hr>
 * <dt><span class="strong">类功能简介:</span></dt>
 * <dd>Coffee</dd>
 * <dt><span class="strong">创建时间:</span></dt>
 * <dd>2015-3-24 上午10:22:00</dd>
 * <dt><span class="strong">公司:</span></dt>
 * <dd>帮助页面</dd>
 * 
 * @author aa1000777 - Email:aa1000777@qq.com
 ***************************************************** 
 */
public class AboutDialog extends JDialog implements ActionListener {

	private static final long serialVersionUID = 1L;

	boolean restartflag = false;

	public AboutDialog(JFrame jframe) {
		// TODO Auto-generated constructor stub
		super(jframe, "关于", true);
		// 设置布局为4行一列
		this.setLayout(new GridLayout(4, 1));
		JButton closeButton = new JButton("关闭");
		JLabel label1 = new JLabel("单机版五子棋v1.0");
		JLabel label2 = new JLabel("Made by 1007030316");
		JLabel label3 = new JLabel("Made:2013.2.7-6.8,");
		closeButton.addActionListener(this);
		closeButton.setActionCommand("Close");
		this.add(label1);
		this.add(label2);
		this.add(label3);
		this.add(closeButton);

		this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		this.setLocation(400, 350);
		this.setSize(260, 300);
		this.pack();
		this.setResizable(false);
		this.setVisible(true);

	}

	public boolean getButtonPrassed() {

		return restartflag;
	}

	public void actionPerformed(ActionEvent arg0) {
		if (arg0.getActionCommand() == "Close") {
			this.dispose();
			this.toBack();
		}
	}
}
